﻿/*
    表单样式，包括基本表单，两列表单和复杂表单
*/
.input {
    display: block;
    width: 200px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 0px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;

    &:focus {
        border-color: #66afe9;
        outline: 0;
        -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
        box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);
    }
}

.textarea {
    width: 70%;
    padding: 6px;
    box-sizing: border-box;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 0px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
    -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
    resize: none;
}


.select {
    width: 225px;
    height: 34px;
    padding: 6px 12px;
}

.mini {
    width: 110px !important;
}

.middle {
    width: 180px !important;
}

.larger {
    width: 250px !important;
}

.larger-x {
    width: 400px !important;
}

.checkbox-inline {
    margin-right: 10px;

    input {
        margin: -3px 3px 0 0;
    }
}


/*====表格纵向布局*/
.form-block {
}

.chk-block {
    padding: 10px 0 0 0;

    label {
        display: block;
        margin-bottom: 10px;
    }

    input[type=checkbox], input[type=radio] {
        margin: -2px 3px 0 0;
    }
}

.chk-inline {
    label {
        display: inline-block;
        margin: 0 10px 10px 0;
    }

    input[type=checkbox], input[type=radio] {
        margin: -2px 3px 0 0;
    }
}

.controls-group {
    width: 100%;
    overflow: hidden;
    margin-bottom: 15px;

    &:after, &:before {
        display: table;
        content: "";
    }

    &:after {
        clear: both;
    }
}

.controls-lab {
    display: block;
    float: left;
    min-width: 120px;
    text-align: right;
    margin: 8px 20px 0 0;
}

.controls {
    margin: 0 0px 0 140px;

    .swfupload {
        margin: 5px 0 0 0;
    }

    .input {
        float: left;
    }

    select {
        width: 225px;
        height: 34px;
        padding: 6px 12px;
    }
}

/*验证样式*/
input.error, select.error, input:focus.error, select:focus.error, :focus.error {
    border-color: #b94a48;
    box-shadow: 0 5px 10px rgba(255, 0, 0, 0.075) inset;
}

label.error {
    display: inline-block;
    padding: 9px 10px 0 20px;
    font-size: 13px;
    color: #ff0000;

    i {
        float: left;
        margin-right: 5px;
    }
}

.btn-group {
    margin-bottom: 15px;

    &:after, &:before {
        display: table;
        content: "";
    }

    &:after {
        clear: both;
    }

    .btn {
        float: left;
        margin: 0px;
        border-radius: 0px;
        border: 1px solid #ccc;
        border-width: 1px 1px 1px 0;
        padding: 5px 12px;
        background: #fff;
        color: #666;
        /*background: url(../imgs/bg_btn.png) repeat-x 0 0;*/
        &:hover {
            color: #333;
            background-color: #e6e6e6;
            border-color: #adadad;
        }

        i {
            margin: 0 1px 0 0;
        }

        &:first-child {
            border-bottom-left-radius: 3px;
            border-top-left-radius: 3px;
            border-left: 1px solid #ccc;
        }

        &:last-child {
            border-bottom-right-radius: 3px;
            border-top-right-radius: 3px;
        }

        input[type=button], button[type=button] {
            background: none;
            border: none;
            padding: 0px;
            margin: -4px 0 0 0;
            cursor: pointer;
        }
    }
}

/*#=====基本表格样式*/
.form-base {
    .controls-lab {
        width: 80px !important;
        min-width: inherit;
        max-width: 100px !important;
        margin-right: 10px;
    }

    .controls, .controls-btn {
        margin-left: 100px !important;
    }
}

/*#region ====== 两列表格样式*/
.form-double {
    &:after, &:before {
        display: table;
        content: "";
    }

    &:after {
        clear: both;
    }

    .table-form {
        float: left;
        border-collapse: collapse;
        border-spacing: 0;
        table-layout: fixed;
        width: 980px;
        margin: 0 auto;

        td {
            padding: 4px 8px;
            min-width: 300px;
            width: 300px;

            select, input, button, textarea {
                margin-bottom: 0;
            }

                textarea.textarea {
                    border-radius: 2px;
                    height: 150px;
                    min-height: 150px;
                    outline: medium none;
                    resize: none;
                    width: 95%;

                    &:focus {
                        border-color: #b4b4bf;
                        box-shadow: none;
                    }
                }

            .file-upload {
                margin-bottom: 10px;
            }

            .input-require, .icon-require {
                float: left;
            }

            td .form-column .form-inline {
                line-height: 27px;
            }

            .form-inline {
                * {
                    vertical-align: middle;
                }

                .inline {
                    padding: 0;
                }

                .radio {
                }
            }

                .form-inline > input {
                    margin: 0;
                }

            .input-append {
                input[type="text"] {
                }

                span.add-on {
                    cursor: pointer;

                    i {
                        color: #1f91f2;
                    }
                }

                a.clear {
                    display: inline-block;
                    float: right;
                    font-size: 13px;
                    margin: 5px 20px 0 0;
                    width: 35px;
                }
            }

            td .breadcrumb {
                margin-bottom: 0;
            }

            .form-column .dataTime {
                .input-time, .text-join {
                    float: left;
                }

                .text-join {
                    display: block;
                    padding: 4px 10px;
                }

                .input-time {
                    position: relative;
                    background-color: #fff;
                    border: 1px solid #b4b4bf;
                    width: 120px;

                    input[type="text"] {
                        border: medium none;
                        box-shadow: none;
                        color: #1f91f2;
                        margin: 4px 0 4px 6px;
                        padding: 0;
                    }

                        input[type="text"]:focus {
                            border: medium none;
                            box-shadow: none;
                        }

                    .fa {
                        position: absolute;
                        right: 5px;
                        top: 8px;
                        color: #bf4a04;
                        cursor: pointer;
                        float: right;
                    }
                }

                    .input-time[readonly=true] {
                        background-color: #eee;
                    }

                input[disabled], input[readonly] {
                    cursor: no-drop;
                    background-color: transparent;
                }
            }

            .form-column .chk-block {
                padding: 10px 0 0 0;

                label {
                    display: block;
                    margin-bottom: 10px;
                }

                input[type=checkbox], input[type=radio] {
                    margin: -2px 3px 0 0;
                }
            }

            .form-column .table-form td .form-column .table-form td .icon-require {
                color: #ff0000;
                margin: 9px 0 0 5px;
            }

            td .chk-inline {
                label {
                    display: inline-block;
                    margin: 5px 10px 10px 0;
                }

                input[type=checkbox], input[type=radio] {
                    margin: -2px 3px 0 3px;
                }
            }
        }

            td.text-center {
                text-align: center;
            }

        td, th {
            font-size: 13px;
            vertical-align: middle;
        }

            td.tdCaption, th {
                color: #293a59;
                font-weight: normal;
                padding: 4px 10px 4px 0;
                text-align: right;
                width: 105px;
            }

                td.text-top, th.text-top {
                    padding-bottom: 0;
                    padding-top: 8px;
                    vertical-align: top;
                }
    }

    .table-border {
        border-left: 1px solid #cfcfd6;
        border-top: 1px solid #cfcfd6;

        td, th {
            border-bottom: 1px solid #cfcfd6;
            border-right: 1px solid #cfcfd6;
        }

            td.tdCaption, th {
                background: none repeat scroll 0 0 #d7e2f8;
                color: #2b2d31;
            }
    }

    table.table-single {
        width: 760px;

        td {
            width: 550px;
        }

            td.tdCaption, th {
                width: 90px;
            }
    }

    table.table-info {
        td {
            color: #0b8ed2;
            cursor: default;
        }

            td.tdCaption, th {
            }
    }

    .form-horizontal {
        .textarea {
            border-radius: 2px;
            box-shadow: none;
            height: 125px;
            width: 600px;

            &:focus {
                border-color: #b4b4bf;
                box-shadow: none;
            }
        }

        .control-group {
            margin-bottom: 10px;
        }
    }

    fieldset legend.text-coffee {
        color: #41414c;
    }
}

.sidenav {
    display: inline;
    float: left;
    width: 200px;
    max-width: 220px;
    margin: 0 20px;

    ul {
        position: absolute;
        top: 0px;
        left: 10px;
        width: 160px;
        min-height: 150px;
        margin: 0px 10px;
        box-sizing: border-box;
        padding: 20px;
        background: #f5f5f5;

        li {
            margin-bottom: 15px;
            border-left: 2px solid transparent;

            a {
                display: block;
                padding: 5px 0 5px 25px;
                color: #999;
            }

            &:hover {
                border-left: 2px solid #077DD0;

                a {
                    color: #077dd0;
                }
            }
        }

        .active {
            border-left: 2px solid #077DD0;

            a {
                color: #077DD0;
            }
        }
    }
}

.form {
    display: inline;
    float: left;
    min-width: 700px;

    fieldset {
        border: 0px;
        margin: 0px;
        padding: 0px;

        legend {
            width: 100%;
            height: 32px;
            line-height: 32px;
            border-bottom: 1px solid #eee;
            font-size: 14px;
            margin-bottom: 20px;
            color: #333;
        }
    }
}

.form-advance {
    .form {
        margin-left: 220px;
        margin-bottom: 30px;
    }
}
